<?php

namespace app\common\model;

use think\Model;

class Book extends Model
{
    protected $pk='book_id';
    protected $table='st_book';
    public function checkName($data){
        $res=$this->where('book_name',$data['book_name'])->find();
        if($res){
            return['valid'=>1];
        }else{
            return ['valid'=>0];
        }
    }
}
